Acids are used in subterranean formations in a variety of procedures to enhance hydrocarbon production such as stimulation, damage removal, and scale dissolution. For example, acids (e.g., hydrochloric acid, acetic acid, or formic acid) can be very effective for dissolving carbonate formations, thereby creating conductive channels. For sandstone damage removal, hydrofluoric acid along with hydrochloric or organic acid can be used. Sometimes the acids are used in the form of retarded acids such as gelled acids and emulsified acids.
Pumping such acids into subterranean formations can have negative consequences such as corrosion to metal equipment above surface and downhole, as well as sludge formation as a result of oil interaction with acid or with biproducts of acid-dissolution. Corrosion due to acids is a major parameter affecting the economics of wells; mineral acids in particular are more vigorous and corrosive as compared to organic acids. The high temperature environment of downhole acid use can increase the corrosion rate dramatically. The situation becomes more critical with presence of sour gas (e.g., H2S) in the well, which can cause sulfide stress cracking in metal equipment. Besides metal corrosion, sour gas can also decrease cement sheath integrity and also have destabilizing effects on zonal isolation.